package java_class_work.week08.internet.chat;

import java.net.DatagramSocket;
import java.net.SocketException;

/**
 * @Author Tiam
 * @Date 2022/10/31 18:24
 * @Description:
 */
public class Test {
    public static void main(String[] args) {
        try {
            DatagramSocket ds1 = new DatagramSocket();
            new Thread(new Send(ds1,"192.168.1.125",8888), "发送线程").start();

            DatagramSocket ds2 = new DatagramSocket(8888);
            new Thread(new Receive(ds2), "接收线程").start();
        } catch (SocketException e) {
            e.printStackTrace();
        }
    }
}
